<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Returns whether the given filename is a valid phar filename</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="phar.isfileformat.html">Phar::isFileFormat</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="phar.iswritable.html">Phar::isWritable</a></div>
 <div class="up"><a href="class.phar.html">Phar</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="phar.isvalidpharfilename" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Phar::isValidPharFilename</h1>
  <p class="verinfo">(PHP &gt;= 5.3.0, PECL phar &gt;= 1.2.0)</p><p class="refpurpose"><span class="refname">Phar::isValidPharFilename</span> &mdash; <span class="dc-title">Returns whether the given filename is a valid phar filename</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-phar.isvalidpharfilename-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">final</span> <span class="modifier">public</span> <span class="modifier">static</span> <span class="type">bool</span> <span class="methodname"><strong>Phar::isValidPharFilename</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$filename</code></span>
   [, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$executable</code><span class="initializer"> = true</span></span>
  ] )</div>


  <p class="para rdfs-comment">
   Returns whether the given filename is a valid phar filename that will be recognized
   as a phar archive by the phar extension.  This can be used to test a name without
   having to instantiate a phar archive and catch the inevitable Exception that will be
   thrown if an invalid name is specified.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-phar.isvalidpharfilename-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">filename</code></em></dt>

     <dd>

      <p class="para">
       The name or full path to a phar archive not yet created
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">executable</code></em></dt>

     <dd>

      <p class="para">
       This parameter determines whether the filename should be treated as
       a phar executable archive, or a data non-executable archive
      </p>
     </dd>

    
   </dl>

  </p>

 </div>

 <div class="refsect1 returnvalues" id="refsect1-phar.isvalidpharfilename-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns <strong><code>TRUE</code></strong> if the filename is valid, <strong><code>FALSE</code></strong> if not.
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="phar.isfileformat.html">Phar::isFileFormat</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="phar.iswritable.html">Phar::isWritable</a></div>
 <div class="up"><a href="class.phar.html">Phar</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
